import 'package:dio/dio.dart';
//import 'package:flutter/foundation.dart';
import 'package:flutter_code_framework/utils/global.dart';

class ReqLesson {
  final Dio _dio;
  ReqLesson(this._dio);

  //获取备课列表
  Future<Response> getPreLessonList(
      String userId,
      int bookId,
      String bookMenuIds,
      String ownMenuIds,
      String createTime,
      String pageIndex,
      String pageSize) {
    return _dio.get("/prelesson/getLessonList", queryParameters: {
      "userId": userId,
      "bookId": bookId,
      "bookMenuIds": bookMenuIds,
      "ownMenuIds": ownMenuIds,
      "createTime": createTime,
      "pageIndex": pageIndex,
      "pageSize": pageSize
    });
  }

  //获取备课提交情况
  Future<Response> getReviewList(String preLessonId) {
    return _dio
        .get("/prelesson/review", queryParameters: {"preLessonId": preLessonId});
  }

  //备课删除
  Future<Response> delLesson(String preLessonId) {
    return _dio.get("/prelesson/delLesson",
        queryParameters: {"preLessonId": preLessonId});
  }
}
